﻿#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
; clipboard tool



C(c:="c") {
    ; c-copy, x-cut

    If(c=="c" || c=="x" || c=="v") {
        K("^" c)
    }

    C_Wait()
    Return Clipboard
}



C_Wait(t:=0.5) {
    ; Wait for no more than seconds

    ClipWait, %t%
}



C_Row(c:="c") {
    ; operate current row： c,x,v

    mode := K_ACS()
    If(mode == 0) {  ; if not a,c,s select row
        K("{End}+{Home}")
    }
    If(c == "v"){
        C()
        K("{End}{Enter}")  ; copy row
    }
    C(c)
}
